#lang racket


(require "version.rkt")

(provide
 ; racket paths
 racket-path
 racket-collects-path
 
 ; rosetta paths
 rosetta-path
 set-rosetta-path!
 
 rosetta-config-path
 
 ; rosetta-distros paths
 rosetta-distros-path
 
 ; rosetta-lang paths
 rosetta-lang-path
 set-rosetta-lang-path!
 
 rosetta-lang-trunk-path
 rosetta-lang-trunk-distros-path

 rosetta-lang-wiki-path
 rosetta-lang-wiki-figs-path
 
 ; rosetta-lang urls
 rosetta-lang-url
 rosetta-lang-tags-url
 
 rosetta-lang-trunk-url
 rosetta-lang-trunk-distros-url
 
 rosetta-lang-wiki-url
 rosetta-lang-wiki-figs-url)


; racket paths

(define racket-path (make-parameter (build-path (find-system-path 'pref-dir) (racket-version))))

(define (racket-collects-path)
  (build-path (racket-path) "collects"))


; rosetta paths

(define rosetta-path (make-parameter (build-path (racket-collects-path) "rosetta")))

(define (set-rosetta-path! val)
  (set! rosetta-path (make-parameter val)))


(define (rosetta-config-path)
  (build-path (rosetta-path) "config"))


; rosetta-distros paths

(define (rosetta-distros-path)
  (build-path (racket-collects-path) "rosetta-distros"))


; rosetta-lang paths

(define rosetta-lang-path (make-parameter (build-path (find-system-path 'desk-dir) "rosetta-lang")))

(define (set-rosetta-lang-path! val)
  (set! rosetta-lang-path (make-parameter val)))


(define (rosetta-lang-trunk-path)
  (build-path (rosetta-lang-path) "trunk"))

(define (rosetta-lang-trunk-distros-path)
  (build-path (rosetta-lang-trunk-path) "rosetta-distros"))

(define (rosetta-lang-wiki-path)
  (build-path (rosetta-lang-path) "wiki"))

(define (rosetta-lang-wiki-figs-path)
  (build-path (rosetta-lang-wiki-path) "figs"))


; rosetta-lang urls

(define rosetta-lang-url (make-parameter "http://rosetta-lang.googlecode.com/"))

(define (rosetta-lang-svn-url)
  (format "~Asvn/" (rosetta-lang-url)))

(define (rosetta-lang-tags-url)
  (format "~Atags/" (rosetta-lang-svn-url)))

(define (rosetta-lang-trunk-url)
  (format "~Atrunk/" (rosetta-lang-svn-url)))

(define (rosetta-lang-trunk-distros-url)
  (format "~Arosetta-distros/" (rosetta-lang-trunk-url)))

(define (rosetta-lang-wiki-url)
  (format "~Awiki/" (rosetta-lang-svn-url)))

(define (rosetta-lang-wiki-figs-url)
  (format "~Afigs/" (rosetta-lang-wiki-url)))